from page.base_page import BasePage
from appium.webdriver.common.mobileby import By

class ZsPage(BasePage):

    #定位器
    djgz_locator = (By.ID, 'com.gfeng.daydaycook:id/iv_focus_status')
    text_locator = (By.ID, '//android.widget.TextView[@resource-id=\"com.gfeng.daydaycook:id/title\"]')

    #操作方法
    def click_gz(self):
        self.driver.find_element(*self.djgz_locator).click()

    #获取文本
    def hq_text(self):
        self.driver.find_element(*self.text_locator).get_attribute("text")